using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Measure Cannibalization</para>
    /// <para>Calculates the amount of overlap between two or more polygons. Overlap refers to the extent of the polygons beyond intersection.</para>
    /// <para>计算两个或多个多边形之间的重叠量。重叠是指多边形在相交之外的范围。</para>
    /// </summary>    
    [DisplayName("Measure Cannibalization")]
    public class MeasureCannibalization : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MeasureCannibalization()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input polygon features that will be analyzed for overlap.</para>
        /// <para>将分析重叠的输入面要素。</para>
        /// </param>
        /// <param name="_area_id_field">
        /// <para>Trade Area ID</para>
        /// <para>The field that uniquely identifies each feature in the input layer.</para>
        /// <para>唯一标识输入图层中每个要素的字段。</para>
        /// </param>
        /// <param name="_area_description_field">
        /// <para>Trade Area Description</para>
        /// <para>The field that describes each feature in the input layer.</para>
        /// <para>描述输入图层中每个要素的字段。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the areas of overlap found in the input layer.</para>
        /// <para>输出要素类，将包含在输入图层中找到的重叠区域。</para>
        /// </param>
        public MeasureCannibalization(object _in_features, object _area_id_field, object _area_description_field, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._area_id_field = _area_id_field;
            this._area_description_field = _area_description_field;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Measure Cannibalization";

        public override string CallName => "ba.MeasureCannibalization";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_in_features, _area_id_field, _area_description_field, _out_feature_class, _store_id_field, _create_report.GetGPValue(), _report_title, _report_folder, _report_format, _output_report, _variables];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input polygon features that will be analyzed for overlap.</para>
        /// <para>将分析重叠的输入面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Trade Area ID</para>
        /// <para>The field that uniquely identifies each feature in the input layer.</para>
        /// <para>唯一标识输入图层中每个要素的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Trade Area ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _area_id_field { get; set; }


        /// <summary>
        /// <para>Trade Area Description</para>
        /// <para>The field that describes each feature in the input layer.</para>
        /// <para>描述输入图层中每个要素的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Trade Area Description")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _area_description_field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will contain the areas of overlap found in the input layer.</para>
        /// <para>输出要素类，将包含在输入图层中找到的重叠区域。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Store ID Field</para>
        /// <para>The unique ID that associates a store with each polygon when the inputs are trade areas.</para>
        /// <para>当输入是贸易区时，将商店与每个面关联的唯一 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _store_id_field { get; set; } = null;


        /// <summary>
        /// <para>Create Report</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a report will be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A report will be generated.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A report will not be generated. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否生成报告。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将生成报告。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会生成报告。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Report")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_report_value _create_report { get; set; } = _create_report_value._false;

        public enum _create_report_value
        {
            /// <summary>
            /// <para>CREATE_REPORT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_REPORT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_CREATE_REPORT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_CREATE_REPORT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Report Title</para>
        /// <para>The title of the report. The default value is Measure Cannibalization.</para>
        /// <para>报表的标题。默认值为“测量蚕食”。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Title")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_title { get; set; } = null;


        /// <summary>
        /// <para>Output Report Folder</para>
        /// <para>The output location where the report will be saved.</para>
        /// <para>将保存报表的输出位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _report_folder { get; set; } = null;


        /// <summary>
        /// <para>Report Output Formats</para>
        /// <para>The output format or formats of the report.</para>
        /// <para>报表的输出格式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Output Formats")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _report_format { get; set; } = null;


        /// <summary>
        /// <para>Output Report</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _output_report { get; set; }


        /// <summary>
        /// <para>Variables</para>
        /// <para>One or more variables that will be used to calculate additional overlap metrics—for example, the total number of people and households in intersection areas, or the percentage of the total number of people and households in a trade area falling into overlapped area.</para>
        /// <para>将用于计算其他重叠指标的一个或多个变量，例如，交叉区域中的人口和家庭总数，或贸易区域中属于重叠区域的人口和家庭总数的百分比。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variables")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _variables { get; set; } = null;


        public MeasureCannibalization SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}